import sys 
import random

# SQL语句
table = 'SELECT * FROM CUSTOMER WHERE '
# 字段
C_FIELD = ['C_MKTSEGMENT', 'C_NATION']

# 变量值列表
C_MKTSEGMENT = ['BUILDING','AUTOMOBILE','MACHINERY','HOUSEHOLD', 'FURNITURE']
C_NATION = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]



def func(str):
    return '\'' + str + '\''

for i in range(1,10000):
    query = ''
    a = random.randint(0,1)
    query = query + table + ' '
    query = query + C_FIELD[a] + ' '
    query = query + '=' + ' '
    if a == 0:
        b = random.randint(0,4)
        query = query + func(C_MKTSEGMENT[b]) + ' '
    else:
        c = random.randint(0,24)
        query = query + str(C_NATION[c]) + ' '

    query = query + ';'
    print(query)

